﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace WpfApp.Views
{
    /// <summary>
    /// MainMenu.xaml 的交互逻辑
    /// </summary>
    public partial class MainMenu : Window
    {
        public static String userName;
        HomePage homePage;
        MyWordPage wordPage;
        public MainMenu(string username)
        {
            InitializeComponent();
            userName = username;
            userNameBox.Text = userName;
            homePage = new HomePage(userName);
            wordPage = new MyWordPage(userName);
            ContentArea.Content = homePage;
        }

        private void Button_Click(object sender, RoutedEventArgs e)
        {
            ContentArea.Content = homePage;
        }

        private void Button_Click_1(object sender, RoutedEventArgs e)
        {
            ContentArea.Content = wordPage;
        }
    }
}
